package com.example.tkmapperdemo.beans;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;

/**
 * Date:2022/2/3
 * Author:S
 * Description:
 * Note:
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Category {

    //默认数据库的字段category_id变成categoryId;也可以用@Column指定
    //@Column(name = "category_id")
    //private int cid;
    //private int categoryId;

    @Id
    private Integer categoryId;
    private String categoryName;

    //实体类想要自动映射，要用封装类型Integer，而不是int;或者加@Column(name = "category_level")
    //@Column(name = "category_level")
    //private int categoryLevel;
    private Integer categoryLevel;
    private Integer parentId;
    private String categoryIcon;
    private String categorySlogan;
    private String categoryPic;
    private String categoryBgColor;

}
